﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Storage.EntityModels
{
    #region IPersistable
    
    /// <summary>
    /// Defines methods that an entity that has to be persistent must implement. 
    /// </summary>
    internal interface IPersistable
    {
        /// <summary>
        /// Called when the entity is first inserted in the db.
        /// </summary>
        void OnInsert(BaseTripLoaDataContext db);

        /// <summary>
        /// Called when the entity is already present in the db but needs to be updated.
        /// </summary>
        void OnUpdate(BaseTripLoaDataContext db);
    } 

    #endregion
}
